import java.util.Date;
import java.text.*;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Voyage
{   
    private int nbrVoyageurs;
    public int getNbreVoyageur()
    {
        return this.nbrVoyageurs;
    }
    public void setNbreVoyageurs(int inNbrVoyageurs)
    {
        if (inNbrVoyageurs > 0)
            this.nbrVoyageurs = inNbrVoyageurs;
    }

    private Date dateArrive;
    public Date getDateArrive()
    {   
        return dateArrive;
    }
    public void setDateArrive(Date inDateArrive)
    {
        if (inDateArrive.after(dateDepart) )
            dateArrive = inDateArrive;
    }
    
    private Date dateDepart;
    public Date getDateDepart()
    {   
        return dateDepart;
    }
    public void setDateDepart(Date inDateDepart)
    {
        if (inDateDepart.before(dateArrive) )
            dateDepart = inDateDepart;
    }
    
    private int numeroVoyage;
    private int poidsBagage;
    private String lieuDepart;
    private String lieuArrive;
    private Pilote piloteCourant;
    private Avion avionCourant;
    
    public Voyage()
    {
        SimpleDateFormat dateStandard = new SimpleDateFormat("dd/MM/yyyy");
        try {
            dateDepart = dateStandard.parse("12/02/1999");
        } catch (ParseException ex) {
            Logger.getLogger(Voyage.class.getName()).log(Level.SEVERE, null, ex);
        }
        try {
            dateArrive = dateStandard.parse("13/02/1999");
        } catch (ParseException ex) {
            Logger.getLogger(Voyage.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }
}